package cn.nb12.xbox.service.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.nb12.xbox.dao.GamesDao;
import cn.nb12.xbox.dao.GameslistDao;
import cn.nb12.xbox.po.Games;
import cn.nb12.xbox.service.GamesService;
import cn.nb12.xbox.utils.Assist;
@Service
public class GamesServiceImpl implements GamesService{
	
    @Autowired
    private GamesDao gamesDao;
    
    @Autowired
    private GameslistDao gameslistDao;
    
    @Override
    public long getGamesRowCount(Assist assist){
        return gamesDao.getGamesRowCount(assist);
    }
    @Override
    public List<Games> selectGames(Assist assist){
        return gamesDao.selectGames(assist);
    }
    @Override
    public Games selectGamesByObj(Games obj){
        return gamesDao.selectGamesByObj(obj);
    }
    @Override
    public Games selectGamesById(String id){
        return gamesDao.selectGamesById(id);
    }
    @Override
    public int insertGames(Games value){
        return gamesDao.insertGames(value);
    }
    @Override
    public int insertNonEmptyGames(Games value){
        return gamesDao.insertNonEmptyGames(value);
    }
    @Override
    public int insertGamesByBatch(List<Games> value){
        return gamesDao.insertGamesByBatch(value);
    }
    @Override
    public int deleteGamesById(String id){
        return gamesDao.deleteGamesById(id);
    }
    @Override
    public int deleteGames(Assist assist){
        return gamesDao.deleteGames(assist);
    }
    @Override
    public int updateGamesById(Games enti){
        return gamesDao.updateGamesById(enti);
    }
    @Override
    public int updateGames(Games value, Assist assist){
        return gamesDao.updateGames(value,assist);
    }
    @Override
    public int updateNonEmptyGamesById(Games enti){
        return gamesDao.updateNonEmptyGamesById(enti);
    }
    @Override
    public int updateNonEmptyGames(Games value, Assist assist){
        return gamesDao.updateNonEmptyGames(value,assist);
    }

    public GamesDao getGamesDao() {
        return this.gamesDao;
    }

    public void setGamesDao(GamesDao gamesDao) {
        this.gamesDao = gamesDao;
    }
	@Override
	public List<Games> selectGamesByName(String name) {
		name="%"+name+"%";//模糊查询
		return gameslistDao.selectGamesByName(name);
	}
	@Override
	public int deleteRepeat() {
		return gamesDao.deleteRepeat();
	}

}